package com.example.tsproject.Config;


import com.example.tsproject.interceptor.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @BelongsProject: springbootdemo
 * @BelongsPackage: com.example.springbootdemo.config
 * @Author: YoungDra
 * @CreateTime: 2024/08/06  17:40
 */
@Configuration
public class webconfig implements WebMvcConfigurer {
    @Autowired
    LoginInterceptor loginInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginInterceptor)
                .addPathPatterns("/**");
//                .excludePathPatterns("/loginbyemail1","/loginbyemail2","/email/sendEmail","/TeaLoginJudge","StuLoginJudge");

    }
}
